/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 22652
 * Date: 2024-04-08
 * Time: 17:54
 */
// 单例模式(饿汉模式)
//Singleton
class Singleton{
    // 做出一个限制, 禁止别人去 new 这个实例!!
    private Singleton() {
    }
    private static Singleton instance =new Singleton();

    public static Singleton getSingleton() {
        return instance;
    }
}
public class test {
    public static void main(String[] args) {

    }
}
